Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport: Fix 'index out of range' bug in Packetbeat DNS protocol plugin (#2875) #2909

Merged
merged 2 commits into from
Nov 3, 2016

Conversation

andrewkroh
Copy link
Member

Backport of #2875 to 5.0

When converting resource records into MapStrs the code can run into an index out of range exception when processing OPT psuedo resource records. The code reduces the size of a slice by creating a new, smaller slice and copies the existing data to the smaller slice. But the code did not account for the fact that the length of the slice was smaller when indexing.

Fixes #2872

Cherry picked from: cbde106, 7c2fe09

When converting resource records into MapStrs the code can run into an index out of range exception when processing OPT psuedo resource records. The code reduces the size of a slice by creating a new, smaller slice and copies the existing data to the smaller slice. But the code did not account for the fact that the length of the slice was smaller when indexing.

Fixes elastic#2872

(cherry picked from commit cbde106)
@ruflin ruflin merged commit bcfb24f into elastic:5.0 Nov 3, 2016
@andrewkroh andrewkroh deleted the backport_2875 branch July 5, 2017 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants